package si.yun;

import com.github.tobato.fastdfs.FdfsClientConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @program: SiYunClass
 * @description: 启动类
 * @author: 崔晓晨
 * @create: 2021-07-04 18:45
 **/

@SpringBootApplication/*(exclude={SecurityAutoConfiguration.class, SecurityFilterAutoConfiguration.class})*/
@ServletComponentScan//扫描监听器，过滤器，servlet
@EnableTransactionManagement//开起事务
@MapperScan("si.yun.dao")//扫描映射文件
@Import(FdfsClientConfig.class)//图片服务器上传
@EnableScheduling //开启定时任务
@EnableCaching
@EnableAsync
@EnableAspectJAutoProxy(exposeProxy = true)
public class Run {
    public static void main(String[] args) {
        SpringApplication.run(Run.class, args);
        System.out.println("___________.__    .__        __      _________ .__                   .___");
        System.out.println("\\__    ___/|  |__ |__| ____ |  | __  \\_   ___ \\|  |   ____  __ __  __| _/");
        System.out.println("  |    |   |  |  \\|  |/    \\|  |/ /  /    \\  \\/|  |  /  _ \\|  |  \\/ __ |");
        System.out.println("  |    |   |   Y  \\  |   |  \\    <   \\     \\___|  |_(  <_> )  |  / /_/ |");
        System.out.println("  |____|   |___|  /__|___|  /__|_ \\   \\______  /____/\\____/|____/\\____ |");
        System.out.println("                \\/        \\/     \\/          \\/                       \\/");
        System.out.println("Startup...OK");
    }
}